package org.jeecg.modules.black.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.modules.black.entity.Black;
import org.jeecg.modules.black.mapper.BlackMapper;
import org.jeecg.modules.black.service.IBlackService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 黑名单
 * @Author: jeecg-boot
 * @Date:   2025-10-21
 * @Version: V1.0
 */
@Service
public class BlackServiceImpl extends ServiceImpl<BlackMapper, Black> implements IBlackService {

    @Override
    public List<Black> getByPlateAndIdCard(String plate, String idCard) {
        LambdaQueryWrapper<Black> wrapper = Wrappers.lambdaQuery();
        wrapper.eq(Black::getValue, plate)
                .or()
                .eq(Black::getValue, idCard);
        return this.list(wrapper);
    }
}
